package com.yangchao.ch05

def builder = new groovy.json.JsonBuilder()

def root = builder.students {
    student {
        studentname 'Joe'
        studentid '1'

        Marks(
                Subject1: 10,
                Subject2: 20,
                Subject3:30,
        )
    }
}
println(builder.toString());
